# 主要学习 线程池
# 一次开辟一些线程, 交给任务, 循环调度
from concurrent.futures import ThreadPoolExecutor


def func(name):
    for i in range(1, 100):
        print(name + "--func--->" + str(i) + "\n")


if __name__ == '__main__':
    # 进程池用 ProcessPoolExecutor
    with ThreadPoolExecutor(10) as t:
        for i in range(1, 100):
            t.submit(func, f"线程t{i}")

    print("over!!")
